// Press Shift twice to open the Search Everywhere dialog and type `show whitespaces`,
// then press Enter. You can now see whitespace characters in your code.
public class Main {
    public static void main(String[] args) {
        // Press Alt+Enter with your caret at the highlighted text to see how
        // IntelliJ IDEA suggests fixing it.
        int sum =0,i,j;
        for(i=0;i<=1000;i++){
            for(j=1,sum = 0;j<i;j++){
                if(i%j ==0)
                    sum= sum +j;
            }
            if(sum==i)
                System.out.println("完数:"+i);
        }

    }
}